﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "../../global/head.h"
#include "log_cmd.h"

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace xos_log
{
    log_cmd::log_cmd()
    {
    }

    log_cmd::~log_cmd()
    {
    }

    // 
    // 输出日志
    // 
    int log_cmd::out_put_log( i_log_msg * pLogMsg )
    {
        int nRet = 0;

        const char * lpszLog = pLogMsg->get_log_content( 0, 0, 0 );
        g_pSysData->m_pContainer->misc()->out_put_to_cmd( lpszLog );

        return nRet;
    }

    int log_cmd::flush()
    {
        int ret = 0;
        return ret;
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 
    // for release_impl to use.
    // 

    int log_cmd::put_back_to_pool( log_cmd * pT, bool bLock )
    {
        int ret = 0;
        delete pT;
        return ret;
    }

    int log_cmd::init()
    {
        int ret = 0;
        return ret;
    }

    int log_cmd::term()
    {
        int ret = 0;
        return ret;
    }
} // xos_log
